<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        input {
            width: 200px;
            height: 30px;
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 5px;
            }
input:focus {
            outline: none;
            border-color: #333;
            }
    </style>
    <!-- <input type="text"> -->
</head>
<body>
    <input type="text">
    <script>
        const input = document.querySelector('input');
        input.addEventListener('keydown', function() {
            console.log('keydown');
            });
            input.addEventListener('keyup', function() {
                console.log('keyup');
                });
                input.addEventListener('input', function() {
                    console.log(input.value);
                    });
    </script>
</body>
</html>